<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>卖家-修改个人信息</title>
<link href="<?php echo $this->_webroot('/user/css/common.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->_webroot('/user/css/content1.css'); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->_webroot('/user/js/jquery-1.7.1.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->_webroot('/user/js/common.js'); ?>" type="text/javascript"></script>


</head>
<body>
<psp:tags     htmlname='user_topnav1'  iconname='usertopnav1' />
<psp:tags     htmlname='user_topsearch'  iconname='usertopsearch' />

<div class="main">
	<div class="main-left">
    	<div class="title">会员管理中心</div>
        <psp:tags     htmlname='user_menulist'  iconname='usermenulist' />
    </div>
<link href="<?php echo $this->_webroot('/user/css/shoprequest.css'); ?>" rel="stylesheet" type="text/css" />   
    <div class="main-right main_right">
	

            <div class="cont">
                <div class="cont_title">店铺商品分类<span class="tr_op"><a href="<?php echo $this->_url('goods/categorylist');?>">店铺商品分类</a></span></div>
              
			<form action="<?php echo $this->_url('goods/categoryedit/'.$shop_category_info['id']);?>" method="post" name="shop_category_add" onsubmit="return checkForm();">
				<table width="100%" border="0" cellspacing="0">
					<tr><td class="textright" width="100px;">分类名称:</td>
						<td><input type="text" name="data[shopusercategorie][shop_cat_name]" value="<?php echo  $shop_category_info['shop_cat_name'];?>" style="width:250px;" maxlength="50" /> <span class="red">*</span></td></tr>
					<tr>
						<td class="textright">上级分类:</td>
						<td>
							<select name="data[shopusercategorie][parent_id]">
								<option value='0'>顶级分类</option>
							<?php  if(!empty($category_list_new)){
function get_sub_category ($category_list,$parent_id) {
	$array = array();
	foreach($category_list as $k=>$v) {
		if($v['parent_id']==$parent_id) {
			$array[$k] = $v;
		}
	}
	return $array;
}							
							
								$category_0 = get_sub_category($category_list_new,0);
								foreach($category_0 as $v)
								{?>
								<option value='<?php echo  $v['id'];?>' <?php if($v['id']==$shop_category_info['parent_id']){?> selected<?php }?>><?php echo  $v['shop_cat_name'];?></option>
							<?php  }
							}?>
							</select>
						</td>
					</tr>
					<!--  <tr><td class="textright">数量单位:</td><td><input type="text" name="data[shopusercategorie][shop_cat_unit]" value="<?php echo  $shop_category_info['shop_cat_unit'];?>" style="width:70px;" maxlength="8" /></td></tr>-->
					<tr><td class="textright">排序:</td><td><input type="text" name="data[shopusercategorie][sort_order]" value="<?php echo  $shop_category_info['sort_order'];?>" style="width:70px;" maxlength="2" /></td></tr>
					<tr><td colspan="2" class="center"><input type="hidden" name="data[shopusercategorie][shop_id]" value="<?php echo  $shop_id;?>" /><input type="submit" name="submit" value="添加商品分类" /></td></tr>
				</table>
			</form>			  
			  
			  
			  
			  
            </div>
	
	

        

    </div>
    <div class="clear"></div>
</div>

<div class="footer">
    <psp:tags     htmlname='user_footer_helper'  iconname='userfooterhelper' />

</div>
<script language="JavaScript">
<!--
function checkForm() {
	var shop_cat_name = document.getElementsByName("shop_cat_name")[0];
	if(shop_cat_name.value=='') {
		alert("店铺分类名称不能为空！");
		shop_cat_name.focus();
		return false;
	}
	return true;
}
//-->
</script>

</body>
</html>